import Vue from 'vue'
import VueRouter from 'vue-router'
// import One from '@/views/App.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '/',
    meta: {
      name: 'layout'
    },
    component: () => import('@/views/App'),
    children: [
      {
        path: '/home',
        name: 'tourist',
        component: () => import('../views/home/index.vue')
      },
      {
        path: '/tab',
        name: 'tab',
        meta: {
          name: 'tab'
        },
        component: () => import('@/views/tableCom')
      },
      {
        path: '/person',
        name: 'person',
        meta: {
          name: 'person'
        },
        component: () => import('@/views/person')
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    meta: {
      name: 'login'
    },
    component: () => import('@/components/login')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
